﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;


namespace MvcUI.Filter
{
    public class ActionFilter : ActionFilterAttribute
    {
        
        public string Role { get; set; }
        public override void OnActionExecuting(ActionExecutingContext filterContext)
        {
            
            filterContext.RequestContext.HttpContext.Response.Write("<br />OnActionExecuting");
            base.OnActionExecuting(filterContext);
        }

        public override void OnActionExecuted(ActionExecutedContext filterContext)
        {
            //filterContext.RequestContext.HttpContext.Response.Write("<br />OnActionExecuted");
            base.OnActionExecuted(filterContext);
        }

        public override void OnResultExecuting(ResultExecutingContext filterContext)
        {
            //filterContext.RequestContext.HttpContext.Response.Write("<br />OnResultExecuting");
            base.OnResultExecuting(filterContext);
        }

        public override void OnResultExecuted(ResultExecutedContext filterContext)
        {
           // filterContext.RequestContext.HttpContext.Response.Write("<br />OnResultExecuted");
            base.OnResultExecuted(filterContext);
        }

    }
}
